/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #d0d0d0;
}

.btn-primary {
    background-color: #4285f4;
    color: white;
}

.btn-primary:hover {
    background-color: #3367d6;
}

.btn-danger {
    background-color: #ea4335;
    color: white;
}

.btn-danger:hover {
    background-color: #d33426;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 3px;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox input {
    margin-right: 10px;
}

.form-group.checkbox label {
    margin-bottom: 0;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* 登录/注册页面样式 */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabs {
    display: flex;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tab:hover {
    background-color: #e0e0e0;
}

.tab.active {
    background-color: white;
    border-bottom: 2px solid #4285f4;
    font-weight: bold;
}

.form-container {
    padding: 20px;
}

.form {
    display: none;
}

.form.active {
    display: block;
}

.form h2 {
    margin-bottom: 20px;
    color: #4285f4;
    text-align: center;
}

/* 笔记平台页面样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notes-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
}

.notes-list {
    margin-bottom: 20px;
    min-height: 300px;
}

.note-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.note-item:hover {
    background-color: #f9f9f9;
}

.note-item h3 {
    margin-bottom: 5px;
    color: #4285f4;
}

.note-item .note-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 12px;
    margin-top: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 50px auto;
    padding: 20px;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 20px;
    color: #4285f4;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.note-content {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
}

.note-content pre {
    white-space: pre-wrap;
    font-family: inherit;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}


/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
}

/* 按钮样式 */
button {
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

#logout-btn {
    background-color: #dc3545;
}

#logout-btn:hover {
    background-color: #c82333;
}

/* 图书列表样式 */
.books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.book-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.book-card p {
    color: #666;
    margin-bottom: 5px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 图书详情样式 */
.book-details {
    margin-bottom: 20px;
}

.book-details p {
    margin-bottom: 10px;
}

.book-details strong {
    color: #333;
} 